package zhu.areas.hatchnav.data;

import java.util.Date;
import zhu.areas.hatchnav.data.Article;
import zhu.areas.user.data.User;

/**
 * @hibernate.class  table="T_ArticleComm"   dynamic-insert="true"  dynamic-update="true"
 * @author Administrator
 *
 */

public class ArticleComm implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private int commID;
	private Article article;//文章ID
	
	//private User commUser;//评论人ID
	private int commUserID;
	
	private String commUName;
	private Date commTime;
	private String commContent;
	
	private ArticleComm lastComm;//被评论的评论
	
	public ArticleComm() {
		
	}

	public ArticleComm(int commID) {
		this.commID = commID;
	}

	public ArticleComm(int commID, Article article) {
		this.commID = commID;
		this.article = article;
	}

	/**
	 * @hibernate.id column="CommID"  generator-class="increment"  unsaved-value="null"
	 * @return
	 */
	public int getCommID() {
		return commID;
	}

	public void setCommID(int commID) {
		this.commID = commID;
	}

	/** 
	*@hibernate.many-to-one class="zhu.areas.hatchnav.data.Article"	not-null="true"
	* column="ArticleID"
	*/
	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	/**
	 * @hibernate.property column = "CommUID" not-null="true"
	 * @return
	 */
	public int getCommUserID() {
		return commUserID;
	}

	public void setCommUserID(int commUserID) {
		this.commUserID = commUserID;
	}

	/**
	 * @hibernate.property column = "CommUName" not-null="true"
	 * @return
	 */
	public String getCommUName() {
		return commUName;
	}

	public void setCommUName(String commUName) {
		this.commUName = commUName;
	}

	/**
	 * @hibernate.property column = "CommTime" not-null="true"
	 * @return
	 */
	public Date getCommTime() {
		return commTime;
	}

	public void setCommTime(Date commTime) {
		this.commTime = commTime;
	}

	/**
	 * @hibernate.property column = "CommContent" not-null="true"
	 * @return
	 */
	public String getCommContent() {
		return commContent;
	}

	public void setCommContent(String commContent) {
		this.commContent = commContent;
	}

	/**
	 * @hibernate.one-to-one class="zhu.areas.hatchnav.data.ArticleComm" cascade="all" constrained="true"
	 * column="CommID"
	 */
	public ArticleComm getLastComm() {
		return lastComm;
	}

	public void setLastComm(ArticleComm lastComm) {
		this.lastComm = lastComm;
	}

}
